﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    /// <summary>
    /// 前台订单主表(字段计算关联见：Data.MySql\订单字段关联表.xlsx
    /// </summary>
    public partial class corecmsfoodorderingmaster
    {
        /// <summary>
        /// 序号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderId", IsPrimaryKey = true)]
        public Int64 orderId { get; set; }

        /// <summary>
        /// 门店id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "storeId")]
        public long storeId { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderNo")]
        public String orderNo { get; set; }

        /// <summary>
        /// 取单号
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "number", IsNullable = true)]
        public String number { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "orderDate")]
        public DateTime orderDate { get; set; }

        /// <summary>
        /// 商品数
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "foodCount")]
        public Int32 foodCount { get; set; }

        /// <summary>
        /// 就餐人数
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "person")]
        public Int32 person { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumQuantity")]
        public decimal sumQuantity { get; set; }

        /// <summary>
        /// 单据应收金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumAmount")]
        public decimal sumAmount { get; set; }

        /// <summary>
        /// 单据实收金额
        /// sumRealAmount = sumAmount - sumReduceAmount;
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumRealAmount")]
        public decimal sumRealAmount { get; set; }

        /// <summary>
        /// 做法金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumTaskAmount")]
        public Decimal sumTaskAmount { get; set; }

        /// <summary>
        /// 加料金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumFeedAmount")]
        public Decimal sumFeedAmount { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumDiscountAmount")]
        public Decimal sumDiscountAmount { get; set; }

        /// <summary>
        /// 抹零金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumFloorAmount")]
        public Decimal sumFloorAmount { get; set; }

        /// <summary>
        /// 减免金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumFreeAmount")]
        public decimal sumFreeAmount { get; set; }

        /// <summary>
        /// 优惠金额
        /// sumReduceAmount = sumDiscountAmount + sumFreeAmount + sumPresentAmount
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumReduceAmount")]
        public Decimal sumReduceAmount { get; set; }

        /// <summary>
        /// 赠送金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumPresentAmount")]
        public Decimal sumPresentAmount { get; set; }

        /// <summary>
        /// 小计（未抹零和减免前 ）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumAllAmount1")]
        public Decimal sumAllAmount1 { get; set; }


        /// <summary>
        /// 小计（未抹零和减免后 ）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sumAllAmount")]
        public Decimal sumAllAmount { get; set; }


        /// <summary>
        /// 电话号码
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "telephone", IsNullable = true)]
        public String telephone { get; set; }

        /// <summary>
        /// 订单类型	0全部；1堂食；2外带;
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "ordertype", IsNullable = true)]
        public Int32? ordertype { get; set; }

        /// <summary>
        /// 桌号id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "deskId", IsNullable = true)]
        public Int64 deskId { get; set; }

        /// <summary>
        /// 班次Id
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "classId", IsNullable = true)]
        public Int64 classId { get; set; }

        /// <summary>
        /// 会员ID
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "userId", IsNullable = true)]
        public Int64? userId { get; set; }

        /// <summary>
        ///  支付状态(0 未付款1 已预结2 已支付)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "payStatus", IsNullable = false)]
        public Int32 payStatus { get; set; }

        /// <summary>
        /// 订单状态(UTableItemInfo.TableStatus)
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "status", IsNullable = false)]
        public Int32 status { get; set; }

        /// <summary>
        /// 用户Id 
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "sysUserId", IsNullable = true)]
        public long sysUserId { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "createTime")]
        public DateTime createTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "remark", IsNullable = true)]
        public String remark { get; set; }
    }
}
